home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Source / MiscInspectorKit / MiscDefaultInspector.m < prev    next >
Text File  |  1995-04-12  |  1KB  |  60 lines

  1. /* MiscDefaultInspector.m                 
  2.  *
  3.  * This is a class that shows a single view, does no work and registers for
  4.  * every possible trigger inside the popUp.
  5.  *
  6.  * For more interface-info see the header file. In depth information
  7.  * can be found here in the source-code.
  8.  *
  9.  * Written by:         Thomas Engel
  10.  * Created:            09.02.1994 (Copyleft)
  11.  * Last modified:     09.02.1994
  12.  *
  13.  * Copyright (c) 1995 Thomas Engel
  14.  */
  15.  
  16. //#import "MiscDefaultInspector.h"
  17. //#import "MiscInspectorManager.h"
  18. #import <misckit/MiscSwapViewByPopUp.h>
  19. #import <misckit/misckit.h>
  20.  
  21. @implementation MiscDefaultInspector
  22.  
  23. - addWrappedControllers
  24. {
  25.     // Lets get the real swapView and add all our controllers (self is some
  26.     // way). If there is no list of our copies we will create it.
  27.     // This way we will set our swapView....but it has no affect.
  28.  
  29.     id    aController;
  30.     id    popUpList;
  31.     int    i;
  32.     
  33.     swapView = [manager swapView];
  34.  
  35.     if( !controllers )
  36.     {
  37.         popUpList = [[[[swapView popUpCover] target] itemList] cellList];
  38.         controllers = [List new];
  39.         for( i=0; i<[popUpList count]; i++ )
  40.         {
  41.             aController = [self copy];
  42.             [aController setTrigger:[popUpList objectAt:i]];
  43.             [controllers addObject:aController];
  44.         }
  45.     }
  46.         
  47.     for( i=0; i<[controllers count]; i++ )
  48.         [swapView addController:[controllers objectAt:i]];
  49.  
  50.     return self;
  51. }
  52.  
  53. @end
  54.  
  55. /*
  56.  * History: 09.02.1994 First code entered.
  57.  *
  58.  *
  59.  * Bugs: - no read/write;
  60.  */